home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: peer-news.britain.eu.net!uknet!owl-uk!news
- From: Kenn@owl-uk.co.uk (Ken Nicolson)
- Subject: Re: [] overloding vc4.0
- Message-ID: <31076a6e.3951286@hector>
- Sender: news@owl-uk.co.uk (News system)
- Organization: Office Workstations Limited
- X-Newsreader: Forte Agent .99c/16.141
- References: <NEWTNews.822530713.12255.moti@motisaad.netmanage.co.il>
- Date: Thu, 25 Jan 1996 11:36:41 GMT
-
- Moti Saadon <moti@netmanage.co.il> wrote:
-
- >
- >Why can't I compile this code at vc++4.0?
- >Thanks.
- >
- >//----------------------------begin code-----------------
- >
- [snip!]
- >
- >//now comes the definition of the subscript operator
- >template <class Type>
- >Type &Array::operator[] (int i)
-
- Type &Array<Type>::operator[] (int i)
- ^^^^^^
-
- I found the answer in vc++4.0 by hitting the F1 key on the highlighted
- "template" keyword, and the correct syntax for declaring a member
- function is right there on the help page.
-
- Ken
-